package com.estagio.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table (name="itensVenda")
public class ItemVenda extends ItemNota {
	
	@Id
	@SequenceGenerator(name="itensVenda_id", sequenceName="itensVenda_id_seq",allocationSize=1,initialValue = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="itensVenda_id" )
	private Integer idItemVenda;
	
	@JoinColumn(name="idVenda")
	@ManyToOne
	private Venda venda;	
	private Double precoVenda;


	public Integer getIdItemVenda() {
		return idItemVenda;
	}
	public void setIdItemVenda(Integer idItemVenda) {
		this.idItemVenda = idItemVenda;
	}
	public Venda getVenda() {
		return venda;
	}
	public void setVenda(Venda venda) {
		this.venda = venda;
	}
	public Double getPrecoVenda() {
		return precoVenda;
	}
	public void setPrecoVenda(Double precoVenda) {
		this.precoVenda = precoVenda;
	}

}
